/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package client;

import javax.swing.*;

/**
 *
 * @author sun
 * <b>用户登录界面,提供用户的登录或者注册功能</b>
 */
public class LogPanel extends JDialog {

    LogP lp = new LogP();
    boolean end = false;
    
    public LogPanel() {
        this.setResizable(false);
        this.setUndecorated(true);
        this.add(lp);
        this.setVisible(end);
        this.pack();
        this.show();
    }

    public int getMode() {
        return lp.getmode();
    }

    public String[] getNP() {
        return lp.getLog();
    }

    public String[] getRNP() {
        return lp.getReg();
    }

    public int k() {
        LogPanel p = this;
        int m = p.getMode();
        for (;;) {
            System.out.print("");
            m = p.getMode();
            if (m > 0) {
                break;
            }
        }

        return m;
    }

    public static void main(String[] args) {
        LogPanel p = new LogPanel();
        System.out.println(p.k());
    }
}
